package com.leo.foodmaster.admin.foodMaterial.entity;

import java.math.BigDecimal;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.leo.foodmaster.commons.annotation.Excel;
import com.leo.foodmaster.commons.entity.BaseEntity;
import com.leo.foodmaster.commons.entity.File;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Leo
 * @since 2021-07-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "food_material", autoResultMap = true)
@ApiModel(value="FoodMaterial对象", description="食材表")
public class FoodMaterial extends BaseEntity implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "公司Id")
    private Long organId;

    @ApiModelProperty(value = "食材类型Id")
    private Long typeId;

    @ApiModelProperty(value = "食材类型Id")
    @Excel(name = "食材分类")
    private String typeName;

    @ApiModelProperty(value = "食材图片")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<File> pics = new ArrayList<>();

    @ApiModelProperty(value = "规格")
    @Excel(name = "规格")
    private String specs;

    @ApiModelProperty(value = "品牌")
    @Excel(name = "品牌")
    private String brand;

    @ApiModelProperty(value = "税率")
    @Excel(name = "税率")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "单位名称")
    @Excel(name = "计量单位")
    private String unitName;

    @ApiModelProperty(value = "能量")
    @Excel(name = "能量")
    private Double energy;

    @ApiModelProperty(value = "蛋白质")
    @Excel(name = "蛋白质")
    private Double protein;

    @ApiModelProperty(value = "脂肪")
    @Excel(name = "脂肪")
    private Double fat;

    @ApiModelProperty(value = "碳水化合物")
    @Excel(name = "碳水化合物")
    private Double carbohydrate;

    @ApiModelProperty(value = "销售价")
    @Excel(name = "销售价")
    private BigDecimal salePrice;

    @ApiModelProperty(value = "进货价")
    @Excel(name = "进货价")
    private BigDecimal buyPrice;

    @ApiModelProperty(value = "上次进货日期")
    private LocalDate lastBuyDate;

    @ApiModelProperty(value = "库存")
    @Excel(name = "库存")
    private BigDecimal amount;

    @ApiModelProperty(value = "食材状态：0（在用）1（停用）")
    private String status;

    @ApiModelProperty(value = "分配单位")
    private Integer expressionUnit;

    @ApiModelProperty(value = "标签打印区分供应商：0（不区分）1（区分）")
    private String supplier;

    @ApiModelProperty(value = "食材加工阶段：1（毛菜）2（净菜）3（熟食）")
    private String processPhase;

    @ApiModelProperty(value = "毛菜净菜转换率（计算得出）")
    private BigDecimal materialToSemiFinishedRate;

    @ApiModelProperty(value = "毛菜或净菜Id")
    private Long foodMaterialId;

    @ApiModelProperty(value = "净菜是否单独采购：0（不是）1（是）")
    private String semiFinishedPurchase;

}
